//
//  Account.h
//  iMoney
//
//  Created by VertigoSol on 9/11/08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Expense.h"

@interface Account : NSObject {

	NSDate* date;
	NSMutableArray* expenses;
	float totalAmount;
	float offsetAmount;
	NSString* accountName;
	NSString* type;
	BOOL dirty;
	
}

@property(readwrite) float totalAmount;
@property(readwrite) float offsetAmount;
@property(nonatomic, retain) NSMutableArray* expenses;
@property(nonatomic, retain) NSString* accountName;
@property(nonatomic, retain) NSString* type;
@property(nonatomic, retain) NSDate* date;


-(id)init;
-(id)initWithName:(NSString*)accountName;
-(id)initWithNameOffsetAmount:(NSString*)aName:(float) aOffsetAmount;
-(void)addExpense:(Expense*)expense:(BOOL) dateSorted;
-(void)removeExpense:(Expense*) expense;
-(void)removeExpenseAtIndex:(int)index;
-(Expense*) getExpense:(int) index;
-(NSMutableDictionary*) getExpensesAsDateDic;
-(NSEnumerator*)objectEnumerator;
-(int) count;
-(void) updateAmount;

@end
